#include "animal.h"

void fishEat(void)
{
    printf("i m fish ,i want eat green grass");
}

ANIMAL grassFish = {

    .name = "fish",
    .age  = 3,
    .eat =fishEat
};

struct animal * PutLinkfish(struct animal* head)
{
    struct animal * lost;
    lost = head;

    if(head == NULL)
    {
        head = &grassFish;
    }

    else
    {
        while(lost -> next != NULL)
        {
            lost = lost->next;
        }

        lost->next = &grassFish;
    }

    return head;
}


